<template>
  <div>
    <commonHeader title="NAV"></commonHeader>
    <el-button @click="getArtiles">getArtiles</el-button>
    <pre>
      {{state.list}}
    </pre>

    <el-input v-model="state.inputVal"></el-input>
    <p>
      {{state.inputVal}}
    </p>
    <p>
      counter---{{counter}}
    </p>
  </div>
</template>
<script setup>
import httpApi from "../api/admin.js";
const counter = useCounter();
const state = reactive({
  list:[],
  inputVal:''
}); // 响应式数据

getArtiles();
async function getArtiles() {
  const data = await httpApi.get_article();
  state.list = [...state.list,data.list];
}

</script>
